import request from '@/utils/request'


export default {

    verify(){
        return request({
            url: `/auth/verify`,
            method: 'get',
        })
    },

    login(user){
        return request({
            url: `/auth/login`,
            method: 'post',
            data:user
        })
    },

    code(phone){
        return request({
            url: `/user/code`,
            method: 'post',
            data:{"phone":phone}
        })
    },

    register(user,code){
        return request({
            url: `/user/register`,
            method: 'post',
            params:{username:user.username,
                password:user.password,
                phone:user.phone,
                role:user.role,
                code:code},
        })
    }


}